using System;
using System.Windows.Data;

namespace ibba.src.noriskbo.code.converter
{
    public class StatusImportToImageConverter: IValueConverter
    {
        
        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (value is string)
                switch (value.ToString().Trim())
                {
                    case Constantes.StatusImportLote.ALTERACAO:
                        return Constantes.SourceImageApp.STATUS_IMPORT_A;

                    case Constantes.StatusImportLote.INCLUSAO:
                        return Constantes.SourceImageApp.STATUS_IMPORT_I;

                    case Constantes.StatusImportLote.ERRO:
                        return Constantes.SourceImageApp.STATUS_IMPORT_E;

                    case Constantes.StatusImportLote.COPIAR:
                        return Constantes.SourceImageApp.STATUS_IMPORT_C;

                    case Constantes.StatusImportLote.PROCESSANDO:                    
                        return Constantes.SourceImageApp.BOTAO_VALIDAR_ARQ;

                    case Constantes.StatusImportLote.FINALIZADO:
                        return Constantes.SourceImageApp.STATUS_AP;

                    default:
                        return null;
                }
            else
                return null;

        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            //throw new NotImplementedException();
            return value;
        }

        #endregion
    }
       
}
